
import {
    createApp,
    readonly
} from 'vue'
import {
    createPinia
} from 'pinia'

import * as echarts from 'echarts'

import "vuetify/styles"
import {createVuetify} from "vuetify"
import * as components from "vuetify/components"
import * as directives from 'vuetify/directives'


import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import anime from "animejs/lib/anime.es.js"

import App from './App.vue'
import router from './router'

// markdown显示
import VMdPreviewHtml from "@kangc/v-md-editor/lib/preview-html"

import './assets/main.css'
import '@/assets/styles/three-main.css'

import '@kangc/v-md-editor/lib/style/preview-html.css'
import '@kangc/v-md-editor/lib/theme/vuepress'


const vuetify = createVuetify({
    components,
    directives,
    theme: {
        defaultTheme: 'dark',
      },
})
const app = createApp(App)


app.config.globalProperties.SystemMotto = "The problem is not the problem. The problem is your attitude about the problem."
//全局变量也可使用provide 和inject定义
let globalData = {
    SystemName: "Text Sentence Analysis",

}

app.use(createPinia())
app.use(router)

app.use(ElementPlus)
app.use(VMdPreviewHtml)
app.use(vuetify)

//此处使用应用层的Provide
// app.provide("anime",anime) 已在APP.vue中provide，此处就不使用了
//readonly 限制为只读
app.provide("globalData", readonly(globalData))
app.mount('#app')